import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import 'react-vant/lib/index.css';
import App from "./pages/app"
import {BrowserRouter as Router,Route,Switch,Redirect,NavLink } from "react-router-dom"
// 所有使用路由得组件都需要被BrowserRouter包裹起来， <Switch>是用来保证路由唯一性得
ReactDOM.render(
  // router是所有使用路由得页码都得用 <Router> 来包起来
  <Router> 
        {/* 保证路由唯一匹配得 */}
        {/* 如果封装路由表，将swict写在路由表里 */}
        
             <App />
       
       
  </Router>
 
  ,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
// reportWebVitals();
